import { Meta, StoryObj } from "@storybook/react";
import { InputField, InputFieldProps } from "./input-field";

const meta: Meta = {
  title: "Components/InputField",
  component: InputField
};

type Story = StoryObj<InputFieldProps>;

export const Default: Story = {
  args: {
    label: "Name"
  }
};

export const Textarea: Story = {
  args: {
    label: "Name",
    type: "textarea"
  }
};

export const WithError: Story = {
  args: {
    label: "Name",
    error: {
      type: "required",
      message: "Name is required!"
    }
  }
};

export default meta;
